home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / CGIPERL / MACPERL / MSRCE418.HQX / Perl Source ƒ / Perl / t / mac / CommConnect.t < prev    next >
Encoding:
Text File  |  1994-10-05  |  724 b   |  30 lines

  1. #
  2. # File:   CommConnect.t  -- Test program for CommConnect.pl
  3. # Author: XFCN           -- Alex Metcalf <alex@metcalf.demon.co.uk>
  4. #         Perl Embedding -- Matthias Neeracher <neeri@iis.ee.ethz.ch>
  5. #
  6. # The CommConnect XFCN is ShareWare! Please refer to the HyperCard 
  7. # stack you should have received with this file for details.
  8. #
  9.  
  10. &MacPerl'DebugExternals(1);
  11.  
  12. require "CommConnect.pl";
  13.  
  14. print &CommConnect'Prepare(), "\n";
  15. print &CommConnect'Choose(), "\n";
  16. print &CommConnect'OpenConnection(), "\n";
  17.  
  18. while (1) {
  19.    print &CommConnect'Receive(), "\n";
  20.    $_ = <STDIN>;
  21.  
  22.    last if ($_ eq ".\n");
  23.    next if ($_ eq "?\n");
  24.  
  25.    print &CommConnect'Send($_), "\n";
  26. }
  27.  
  28. &CommConnect'CloseConnection();
  29. &CommConnect'Cleanup();
  30.